package com.hangjiang.gulidear.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hangjiang.gulidear.dao.UserDao;
import com.hangjiang.gulidear.model.User;
import com.hangjiang.gulidear.service.UserService;
import com.hangjiang.gulidear.util.Encryption;

@Service("userService")
public class UserServiceImpl extends BaseServiceImpl<User> implements
		UserService {

	@Resource(name = "userDao")
	public void setDao(UserDao useDao) {
		super.setDao(useDao);
	}

	@Override
	public UserDao getDao() {
		return (UserDao) super.getDao();
	}

	public User findUserByNamePwd(String userName, String password,
			String userType) {
		return getDao().findUserByNamePwd(userName, new Encryption().decryptByDESede(password), userType);
	}

}
